<%-- 通用页头 --%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<header class="navbar navbar-static-top _header">
	<div class="container-fluid">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand" href="${_path}/" title="主页">${_title}</a>
			</div>
			<ul class="nav navbar-nav navbar-collapse collapse">
				<li class="dropdown">
					<a href="${_path}/about/" title="关于">
						<i class="fa fa-info"></i>
					</a>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right navbar-collapse collapse">
				<c:if test="${_user.has('SYS_MANAGER')}">
					<li>
						<a href="${_path}/manage/" title="管理员平台">
							<i class="fa fa-check-square-o fa-lg"></i>
						</a>
					</li>
				</c:if>
				<c:if test="${_user.has('USER_MANAGER')}">
					<li>
						<a href="${_path}/auth/" title="用户管理平台">
							<i class="fa fa-user-plus fa-lg"></i>
						</a>
					</li>
				</c:if>
				<c:if test="${_user.has('EDITOR')}">
					<li>
						<a href="${_path}/compile/" title="编辑平台">
							<i class="fa fa-edit fa-lg"></i>
						</a>
					</li>
				</c:if>
				<c:if test="${_user.has('USER')}">
					<li>
						<a href="${_path}/user/" title="用户设置">
							<i class="fa fa-cog fa-lg"></i>
						</a>
					</li>
				</c:if>
				<c:choose>
					<c:when test="${_user == null}">
						<li>
							<c:choose>
								<c:when test="${_url == null || param.b == false}">
									<a href="${_path}/login/" title="用户登录">
										<i class="fa fa-user fa-lg"></i>
									</a>
								</c:when>
								<c:otherwise>
									<a href="${_path}/login/?back=${_url}" title="用户登录">
										<i class="fa fa-user fa-lg"></i>
									</a>
								</c:otherwise>
							</c:choose>
						</li>
					</c:when>
					<c:otherwise>
						<li>
							<a href="${_path}/logout/" title="注销">
								<i class="fa fa-sign-out fa-lg"></i>
							</a>
						</li>
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
	</div>
</header>
<c:if test="${_user != null}">
	<div class="_user">
		<ul class="text-center">
			<li>
				当前用户 :
				<a href="${_path}/user/message/?read=false" title="信箱" data-toggle="tooltip">
					${_user.user}
					<c:if test="${_message != null && _message != 0}">
						<span class="badge">${_message}</span>
					</c:if>
				</a>
			</li>
		</ul>
	</div>
</c:if>